473,419 Members | 1,842 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

Dynamic SubMenu

I have the following structure for the MenuStrip of a form.

Main1
- SubMenu1
- SubMenu2
Main2

I want dynamicaly to add some option in the SubMenu2 in order to have the
following structure:

Main1
- SubMenu1
- SubMenu2
- SubSubMenu1
- SubSubMenu2
- SubSubMenu3
- SubSubMenu4
Main2
Sep 25 '06 #1
1 2313
Ok. I found how to do it.

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim MySubMenu As New System.Windows.Forms.ToolStripMenuItem("Sub")

AddHandler MySubMenu.Click, AddressOf Subsub1ToolStripMenuItem_Click

Me.Sub1ToolStripMenuItem.DropDownItems.AddRange(Ne w
System.Windows.Forms.ToolStripItem() {MySubMenu})

End Sub

Private Sub Subsub1ToolStripMenuItem_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs)

MsgBox("asdf")

End Sub
Ï "Pitaridis Aristotelis" <pi*******@hotmail.comÝãñáøå óôï ìÞíõìá
news:1159186318.599386@athprx04...
>
I have the following structure for the MenuStrip of a form.

Main1
- SubMenu1
- SubMenu2
Main2

I want dynamicaly to add some option in the SubMenu2 in order to have the
following structure:

Main1
- SubMenu1
- SubMenu2
- SubSubMenu1
- SubSubMenu2
- SubSubMenu3
- SubSubMenu4
Main2

Sep 25 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Macamba | last post by:
Hi all, I am currently developing a website for a voluntary organisation. It is my first step in website development. The dynamic menu I developed has some bugs, which I addressed in another...
1
by: Øyvind Isaksen | last post by:
Hello! I have a MSSQL 2003 database that stores the menu structure (categories) for my webpage. The category table consist of categoryID, category Name and parentID (parentID is the ID of the...
4
by: Stromboli | last post by:
hi people, My problem is that I need to build a dynamic menu (preferably that works in all the browsers) that appears when I mouseover a certain link. The problem is that I have to declare...
15
by: firstcustomer | last post by:
Further to my earlier post, I've found something that does partly what I'm doing, but there are two issues: 1) There is an error in the script. Being a Javascript newbie, I've no idea what the...
5
by: Jonathan | last post by:
Hello All, I am in the process of creating a 2/3 level collapsible/exspanible menu (called "nav") where users can click on a category and have the submenus appear beneath it and so on (allow...
0
Denburt
by: Denburt | last post by:
This code is for a Toggle Button layout on a form, with this code you can set a number of toggle buttons visible and have multiple submenus that will stay hidden when not in use. My main menu is set...
2
by: az538 | last post by:
Hello All, I am having a problem with my menu and submenu system. It works like a champ in IE6 and Firefox but IE7 renders the submenus in incorrect positions on the page. Also, the menu system...
0
by: benfly08 | last post by:
Hi, I used SWT to develop an windows application. In the application there is a dynamic created popup menu. The dynamic part is that i will pass a list of name to be a submenu of one menu item....
1
oll3i
by: oll3i | last post by:
i have written css tab menu but my links in submenu inherit the style of a href in main menu (#menu ul li a)? when i hover over the links in submenu they do change as i want them to change they...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.